﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RegisterTwo.Aspx.cs" Inherits="Users_RegisterTwo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%=this.UI_Head() %>
    <link href="../Css/Register_page.css" rel="Stylesheet" type="text/css" />

    <script src="../Script/formValidator/jquery_last.js" type="text/javascript"></script>

    <link href="../Script/formValidator/style/validator.css" rel="stylesheet" type="text/css" />

    <script src="../Script/formValidator/formValidator.js" type="text/javascript"></script>
    <script src="../Script/formValidator/formValidatorRegex.js" type="text/javascript"></script>
    <script language="javascript" src="../Script/formValidator/DateTimeMask.js" type="text/javascript"></script>
    <script src="../Script/formValidator/datepicker/WdatePicker.js" type="text/javascript"></script>
    <style type="text/css">
        .style1
        {
            width: 298px;
        }
        .style2
        {
        }
    </style>

    <script type="text/javascript">
        $(document).ready(function() {
            $.formValidator.initConfig({ alertmessage: false, formid: "FormCheck", onerror: function(msg) { alert(msg) } });
            $("#Txt_RegName").formValidator({ onshow: "请输入用户名", onfocus: "用户名不能超过14个字符（7个汉字）,最少为4位", oncorrect: "该用户名可以注册" }).inputValidator({ min: 4, max: 14, onerror: "你输入的用户名非法,请确认" }).regexValidator({ regexp: "username1", datatype: "enum", onerror: "用户名格式不正确" })
            .ajaxValidator({
                type: "get",
                url: "../AjaxXml/UserName_Check.aspx",
                pre_proc: function() {
                    var v = 'NewsUser=' + escape($('#Txt_RegName').val()) + '&ram=' + Math.random();
                    return v;
                },
                datatype: "html",
                success: function(data) {
                    if (data == 0) {
                        return true;
                    }
                    else if (data == -1) {
                        this.onerror = "该用户名禁止用户注册，请更换用户名";
                        return false;
                    }
                    else if (data == 1) {
                        this.onerror = "该用户名已存在，请更换用户名";
                        return false;
                    }
                    else {
                        this.onerror = "未知错误";
                        return false;
                    }
                },
                buttons: $("#Button1"),
                error: function() { alert("服务器没有返回数据，可能服务器忙，请重试"); },
                onerror: "该用户名已存在，请更换用户名",
                onwait: "正在对用户名进行合法性校验，请稍候..."
            });
            $("#Txt_pwd").formValidator({ onshow: "请输入密码", onfocus: "密码不能为空", oncorrect: "密码合法" }).inputValidator({ min: 6, max: 14, empty: { leftempty: false, rightempty: false, emptyerror: "密码两边不能有空符号" }, onerror: "密码输入出错,长度必须在6-14位,请确认" });
            $("#ConfirmPwd").formValidator({ onshow: "请输入重复密码", onfocus: "两次密码必须一致哦", oncorrect: "密码一致" }).inputValidator({ min: 6, max: 14, empty: { leftempty: false, rightempty: false, emptyerror: "重复密码两边不能有空符号" }, onerror: "重复密码输入出错,长度必须在6-14位,请确认" }).compareValidator({ desid: "Txt_pwd", operateor: "=", onerror: "二次密码不一致,请确认" });
            $("#Txt_Mail").formValidator({ empty: true, onshow: "可选项,请输入邮箱", onfocus: "请输入正确的邮箱", oncorrect: "恭喜你,输入正确" }).inputValidator({ min: 6, max: 100, onerror: "你输入的邮箱长度非法,请确认" }).regexValidator({ regexp: "^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$", onerror: "你输入的邮箱格式不正确" });
            $("#Txt_Brith").focus(function() { WdatePicker({ maxDate: '%y-%M-%d', isShowClear: false, readOnly: true, skin: 'default', oncleared: function() { $(this).blur(); }, onpicked: function() { $(this).blur(); } }) });
            $("#Txt_Moblie").formValidator({ empty: true, onshow: "可选项" }).inputValidator({ min: 11, max: 11, onerror: "手机号码必须是11位的,请确认" }).regexValidator({ regexp: "mobile", datatype: "enum", onerror: "你输入的手机号码格式不正确" });
        });   
    </script>
        <script src="../Script/province.aspx"></script>

</head>
<body>
    <%=this.UI_TopControl()%>
    <div class="topbanner bodyList">
        <form method="post" runat="server" id="FormCheck">
        <div class="body_995">
            <div class="Reg_Left">
                <%=RegLeft(2) %>
            </div>
            <div class="Reg_Right">
                <ul class="ulRight1">
                    <li><strong>新用户注册</strong></li>
                </ul>
                <div>
                    <table width="100%" border="0" cellpadding="2" cellspacing="4" bordercolor="#FFFFFF"
                        id="RegListTable" style="border-collapse: collapse">
                        <tr class="tdbg">
                            <td class="style1">
                                <b>用户名：</b><br>
                                不能超过14个字符（7个汉字）
                            </td>
                            <td class="style2">
                                <div>
                                    <asp:TextBox ID="Txt_RegName" runat="server" CssClass="RegInput" Width="141px"></asp:TextBox></div>
                                <div id="Txt_RegNameTip">
                                </div>
                            </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <b>密码(至少6位)：</b><br>
                                请输入密码，区分大小写。 请不要使用任何类似 '*'、' ' 或 HTML 字符
                            </td>
                            <td class="style2"><div><asp:TextBox ID="Txt_pwd" TextMode="Password" runat="server"  CssClass="RegInput" Width="141px" ></asp:TextBox>
                            </div>
                                <div id="Txt_pwdTip">
                                </div></td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>确认密码(至少6位,最多14位)：</strong><br>
                                请再输一遍确认
                            </td>
                            <td class="style2"><div>
                                <asp:TextBox ID="ConfirmPwd" TextMode="Password" runat="server"  CssClass="RegInput" Width="141px" ></asp:TextBox>
                                </div>
                                <div id="ConfirmPwdTip">
                                </div>
                            </td>
                        </tr>
                                                <tr class="tdbg">
                            <td class="style1">
                                <strong>性别：</strong><br>
                                请选择您的性别
                            </td>
                            <td class="style2">
                                <asp:RadioButtonList ID="Radio_Sex" runat="server" RepeatColumns="3" 
                                    onselectedindexchanged="Radio_Sex_SelectedIndexChanged">
                                    <asp:ListItem Selected="True">男</asp:ListItem>
                                    <asp:ListItem>女</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>所属分站：</strong><br>
                                请选择你的地址！<span style="color: red;">无法修改</span>
                            </td>
                            <td class="style2">
                            <select id="province" name="provice" onChange="changeProvince(document.getElementById('province'),document.getElementById('city'));">
                                </select>
		
		 <select id="city" name="city">
                                </select>

                                <script language="javascript" type="text/javascript">
                                    initialize(document.getElementById('province'), document.getElementById('city'), "", "");
                                </script> 

                            </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>密码问题：</strong><br>
                                忘记密码的提示问题
                            </td>
                            <td class="style2"><asp:DropDownList ID="StrQ1" runat="server">
                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>问题答案：</strong><br>
                                忘记密码的提示问题答案，用于取回密码
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="Txt_Ans" runat="server" CssClass="RegInput" Width="141px" ></asp:TextBox>
                                &nbsp;
                            </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>Email地址：</strong><br>
                                请输入有效的邮件地址，这将使您能用到网站中的所有功能
                            </td>
                            <td class="style2">
                                <div><asp:TextBox ID="Txt_Mail" runat="server" CssClass="RegInput" Width="141px" ></asp:TextBox></div><div id="Txt_MailTip">
                                </div>
                            </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>出生年月：</strong><br>
                                出生年月必须为日期格式
                            </td>
                            <td class="style2">
                                <div><asp:TextBox ID="Txt_Brith" runat="server" CssClass="RegInput" Width="141px" ></asp:TextBox></div><div id="Txt_BrithTip"></div>
                                </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>联系电话：</strong><br>
                                必须为能随时跟您取得联系的号码
                            </td>
                            <td class="style2">
                                <div><asp:TextBox ID="Txt_Moblie" runat="server" CssClass="RegInput" Width="141px" ></asp:TextBox></div><div id="Txt_MoblieTip"></div>
                                </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>主页：</strong><br>
                                您的网站地址
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="Txt_HomePage" runat="server" CssClass="RegInput" 
                                    Width="141px" ></asp:TextBox>
                                &nbsp;
                            </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>QQ号码：</strong><br>
                                请输入你的QQ号码，以便站长和你联系
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="Txt_QQ" runat="server" CssClass="RegInput" Width="141px" ></asp:TextBox>
                                &nbsp;
                            </td>
                        </tr>
                        <tr class="tdbg">
                            <td class="style1">
                                <strong>MSN：</strong><br>
                                请输入你的MSN帐号，以便站长和你联系
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="Txt_Msn" runat="server" CssClass="RegInput" Width="141px" ></asp:TextBox>
                                &nbsp;
                            </td>
                        </tr>
                        <tr align="center" class="tdbg">
                            <td height="30" colspan="2">
                                <asp:Button ID="Button1" runat="server" Text="马上注册" onclick="Button1_Click" />
                                &nbsp;&nbsp;
                                <input name="Reset" type="reset" id="Reset" value=" 清 除 ">
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        </form>
    </div>
    <%=this.UI_boot() %>
</body>
</html>
